package com.simp.model;

import com.simp.vo.TreeVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author pan.shun
 * @version 2.0
 * @since 2022/3/24 19:37
 */
@Data
public class SysCategoryModel implements TreeVo<SysCategoryModel> {
    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "节点名称")
    private String label;

    @ApiModelProperty(value = "节点值")
    private String value;

    @ApiModelProperty(value = "父节点")
    private String parentId;

    @ApiModelProperty(value = "表名称")
    private String tableName;

    @ApiModelProperty(value = "子集")
    private List<SysCategoryModel> children;

    @Override
    public void setName(String name) {
        this.label = name;
    }

    @Override
    public String getName() {
        return this.label;
    }

    @Override
    public void setParentName(String parentName) {

    }

    @Override
    public String getParentName() {
        return null;
    }

    @Override
    public void setChildren(List<SysCategoryModel> children) {
        this.children = children;
    }

    @Override
    public List<SysCategoryModel> getChildren() {
        return this.children;
    }
}
